<?php 
include_once("inc/TencentTOauth.php");
include_once("inc/SinaTOauth.php");
include_once("inc/NtesTOauth.php");
include_once("inc/SohuTOauth.php");
include_once("inc/DouBanTOauth.php");
include_once("inc/RenRenOauth.php");
header("content-type:text/html; charset=utf-8");
$call_back_uri = "http://localhost:8081/new/oauth/callback.php";
//腾讯
//$tencent = new TencentTOauth();
//$url= $tencent->GetUserAuthortionUri($call_back_uri);
//新浪
//$sina = new SinaTOauth();
//$url= $sina->GetUserAuthortionUri($call_back_uri);
//网易
//$ntes = new NtesTOauth();
//$url = $ntes->GetUserAuthortionUri($call_back_uri);
//搜狐
//$sohu = new SohuTOauth();
//$url = $sohu->GetUserAuthortionUri($call_back_uri);
//豆瓣
//$douban = new DouBanTOauth();
//$url = $douban->GetUserAuthortionUri($call_back_uri);
//echo "<script>location.href='".$url."'</script>";

if(count($_POST)>0 && $_POST["sub"]){
	//人人
    $renren = new RenRenOauth();
    $url = $renren->GetRenRenCode();
    echo "<script>location.href='".$url."'</script>";
}
?>
<form action="" method="post">
    <input type="submit" name="sub" value="获取Authorization Code"></input>
</form>